<template>
  <nav class="navbar navbar-dark bg-dark fixed-top">
  <div class="container-fluid">
    <img class="logo mx-left" src="../assets/logo-w.png"/>
    <a class="navbar-brand mx-auto" href="#">江西软件职业技术大学论坛</a>
    <button class="navbar-toggler" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasDarkNavbar" aria-controls="offcanvasDarkNavbar" aria-label="Toggle navigation">
      <span class="navbar-toggler-icon"></span>
    </button>
    <div class="offcanvas offcanvas-end text-bg-dark" tabindex="-1" id="offcanvasDarkNavbar" aria-labelledby="offcanvasDarkNavbarLabel">
      <div class="offcanvas-header">
        <h5 class="offcanvas-title" id="offcanvasDarkNavbarLabel">论坛操作</h5>
        <button type="button" class="btn-close btn-close-white" data-bs-dismiss="offcanvas" aria-label="Close"></button>
      </div>
      <div class="offcanvas-body">
        <ul class="navbar-nav justify-content-end flex-grow-1 pe-3">
          <li class="nav-item">
            <a class="nav-link active" aria-current="page" @click="toindex()">主页</a>
          </li>
          <li class="nav-item">
            <a class="nav-link" @click="toEdit()" >写文章</a>
          </li>
        </ul>
      </div>
    </div>
  </div>
</nav>
</template>

<script>
export default {
  name :"ForumHeader",
  methods:{
    toEdit(){
      this.$router.push({path:'/EditForum'});
    },
    toindex(){
      this.$router.push({path:'/index'});
    },
  }

}
</script>

<style scoped>
.logo{
  width: 13%;
  height: 50%;
}
</style>